package br.gov.pe.seres.siap.bean;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import br.com.banksystem.bsdemoiselle.annotations.Required;

@Entity
@Table(name = "NOME_TABELA")
@AttributeOverrides({
		@AttributeOverride(name = "ativo", column = @Column(name = "ativo")),
		@AttributeOverride(name = "versao", column = @Column(name = "versao")),
		@AttributeOverride(name = "dataInclusao", column = @Column(name = "dt_incl")),
		@AttributeOverride(name = "dataAlteracao", column = @Column(name = "dt_alt")),
		@AttributeOverride(name = "dataExclusao", column = @Column(name = "dt_exc")),
		@AttributeOverride(name = "usuarioVersao", column = @Column(name = "usu_ver"))
})
@SequenceGenerator(allocationSize = 0, name = "seq_NOME_TABELA", sequenceName = "seq_NOME_TABELA")
public class NOME_POJO extends Pojo {
	
	@Id
	@Column(name = "NOME_TABELA_id")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_NOME_TABELA")
	private Long id;
	
	
	@Basic
	@Required
	@Column(name = "descricao", length = 80, nullable = false)
	private String descricao;

	public NOME_POJO() {
		super();
	}

	public NOME_POJO(Long id, Long versao, String descricao) {
		this.setId(id);
		this.setVersao(versao);
		this.setDescricao(descricao);
	}

	public String getDescricao() {
		return descricao;
	}

	@Override
	public Long getId() {
		return id;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	@Override
	public void setId(final Long id) {
		this.id = id;
	}
}
